<?php
/** $Id: default_form.php 11917 2009-05-29 19:37:05Z ian $ */
	defined( '_JEXEC' ) or die( 'Restricted access' );
	$session = JFactory::getSession();
	$app = JFactory::getApplication();
	$template = JURI::base() . 'templates/' . $app->getTemplate();
	$user		= JFactory::getUser();
	$eventID = JRequest::getVar('eventid');
?>
<link rel="stylesheet" type="text/css" href="<?php echo $template;?>/css/jquery.jscrollpane.css"/>
<link rel="stylesheet" href="<?php echo $template;?>/css/jslider.css" type="text/css"/>
<link rel="stylesheet" href="<?php echo $template;?>/css/jslider.blue.css" type="text/css"/>
<link rel="stylesheet" href="<?php echo $template;?>/css/jslider.plastic.css" type="text/css"/>
<link rel="stylesheet" href="<?php echo $template;?>/css/jslider.round.css" type="text/css">
<link rel="stylesheet" href="<?php echo $template;?>/css/jslider.round.plastic.css" type="text/css"/>
<script type="text/javascript" src="<?php echo $template;?>/js/jquery.dependClass.js"></script>
<script type="text/javascript" src="<?php echo $template;?>/js/jquery.slider-min.js"></script>
<script type="text/javascript" src="<?php echo $template;?>/js/jquery.slider.js"></script>
<script type="text/javascript" src="<?php echo $template;?>/js/jquery.easing.1.3.js"></script>

<div id="header">
  <div id="w-header">
    <div class="logo"><a href="index.php">Forside</a> </div>
    <!--.logo-->
     {module login menu}    
    <!--.nav-top-1-->
    <div class="clear"></div>
    <div class="main-nav">
      {module main menu}
    </div>
    <!--.main-nav-->
    <div class="clear"></div>
  </div>
  <!--#w-header--> 
</div>
<!--#header-->

<div id="main">
  <div id="w-main">
    <div id="main-left">
	<div class="left-find"></div>
	<div class="right-find"></div>
		<div class="find">
			{module search}
		</div> 
      <!--.find-->
      <div class="clear"></div>
      <div class="infomation">
		<?php $article = JUtility::getArticle(15); ?>
        <h2><a href="#"><?php echo $article->title; ?></a></h2>
        <?php echo $article->introtext; ?>
      </div>
      <!--.infomation--> 
    </div>
    <!--#main-left-->
    <div id="main-right2">
      <div id="indhold-caterer-page">
        <div class="icaterer-content">
          <div class="title2">
            <ul>
              <li class="icon-none"><a href="#">Tidligere order</a></li>
              <li><a href="#"><?php echo JHTML::_('string.truncate', ($this->item->title), 38); ?></a></li>
            </ul>
          </div>
          <!--title2-->
          <div class="icaterer-content-info">
            <div class="num-guests"> <img src="<?php echo $template; ?>/images/icon-people.png" width="18" height="18" alt="">
              <p>Antal gæster: <span><?php echo $this->item->guests; ?></span></p>
            </div>
            <!--.num-guests-->
            <div class="address-info"> <img src="<?php echo $template; ?>/images/icon-home.png" width="18" height="18" alt="">
              <p><span><?php echo $this->item->city; ?></span></p>
            </div>
            <!--.address-info-->
            <div class="timer"> <img src="<?php echo $template; ?>/images/icon-timer.png" width="18" height="18" alt="">
              <p><span><?php  echo JFactory::getDate($this->item->deadline)->toFormat('%d-%m-%Y'); ?></span></p>
            </div>
            <!--.timer-->
            <div class="caterer3"> <img width="17" height="16" alt="" src="<?php echo $template; ?>/images/icon-3caterer.png">
              <p><span><a href="<?php echo JRoute::_('index.php?option=com_jobs&view=indholdviewcaterer&eventid='.$this->item->id);?>">der <?php echo count($this->allUsers);?> caterer</a></span></p>
            </div>
            <!--.bnt-looks--> 
          </div>
          <!--.god-content-info-->
          <div class="icaterer-content-main">
            <h1><?php echo $this->item->title; ?></h1>
            <p><?php echo $this->item->description; ?></p>
          </div>
          <!--god-content-main--> 
          
          <?php if (count($this->allUsers) >0) { ?>
          <div class="f-sendmes">
            <form method="post" action="<?php echo JRoute::_('index.php?option=com_jobs');?>" name="fruserrating" id="fruserrating">
              <fieldset>
                <div class="rating">
                  <h1>Rating Carterer</h1>
                  <div>
                  	<label>Select Carterer:</label><br />
                   	<select id="lsUser" name="lsUser"  <?php if (isset($this->eventrating)) { echo 'disabled="disabled" '; } else { echo '';} ?>>
                   	  <?php
					   for($i=0;$i<count($this->allUsers);$i++)
					  		{
								
								?>
                                <option value="<?php echo $this->allUsers[$i]->catererid;?>">
                                <?php echo $this->allUsers[$i]->name;?></option>
                                <?php
							}
					  ?>
                   	</select>
                  </div>
                  <div class="map">
                    <h3>MAD & KVALITET</h3>
                    <div class="layout-slider-container">
                      <div class="layout-slider">
                        <input class="SliderSingle1" type="slider" name="price1" value="<?php if (isset($this->eventrating)) { echo $this->eventrating->rating_quality; } else { echo 10;} ?>" />
                      </div>
                    </div>
                    <!--layout-slider-container--> 
                    <script type="text/javascript" charset="utf-8">
							jQuery(document).ready(function(jQuery) {
                              jQuery(".SliderSingle1").slider({ from: 0, to: 10, step: 1, round: 1, dimension: '&nbsp;', skin: "round" });
							});
                            </script> 
                  </div>
                  <!--.map-->
                  
                  <div class="service">
                    <h3>SErVICE</h3>
                    <div class="layout-slider-container">
                      <div class="layout-slider" >
                        <input class="SliderSingle2" type="slider" name="price2" value="<?php if (isset($this->eventrating)) { echo $this->eventrating->rating_service; } else { echo 10;} ?>" />
                      </div>
                    </div>
                    <!--layout-slider-container--> 
                    <script type="text/javascript" charset="utf-8">
							jQuery(document).ready(function(jQuery) {
                              jQuery(".SliderSingle2").slider({ from: 0, to: 10, step: 1, round: 1, dimension: '&nbsp;', skin: "round" });
							});
                            </script> 
                  </div>
                  <!--.service--> 
                </div>
                <!--.rating-->
                <?php if (!isset($this->eventrating)) {
				
				?>
                <div class="send-besked">
                  <label>Send Besked:</label>
                  <br />
                  <textarea name="desc" id="desc" cols="" rows=""></textarea>
                </div>
                <div class="bnt-send-rating"> <a onclick="updateRating()">Send Bedømmelse</a> </div>
                <?php } ?>
                <!--.bnt-send-rating-->
              </fieldset>
              <input type="hidden" name="task" value="updateRating" />
              <input type="hidden" name="eventid" value="<?php echo JRequest::getVar('eventid');?>" />
			  <?php echo JHtml::_('form.token'); ?>   
            </form>
            <script type="text/javascript">
			  function updateRating()
			   {
				  jQuery('#fruserrating').submit();
				}
			 </script>
          </div>
          <?php } ?>
        </div>
        <!--.god-content--> 
      </div>
      <!--#get-offer-detail-page--> 
    </div>
    <!--#main-right--> 
  </div>
  <!--#w-main--> 
</div>
<!--#main-->
<div class="clear"></div>
<div id="contact">
  <div id="w-contact">
    <div class="left-con">
      <div class="left-con-top"></div>
      <!--left-con-top-->
      <div class="left-con-mid">
        <div class="contact-con">
		<?php $article = JUtility::getArticle(17); ?>
          <h2><a href="#"><?php echo $article->title; ?></a></h2>
          <?php echo $article->introtext; ?>
        </div>
        <!--.contact-con-->
        <div class="contact-con contact-con2">
			<?php $article = JUtility::getArticle(18); ?>
			<h2><a href="#"><?php echo $article->title; ?></a></h2>
			<?php echo $article->introtext; ?>
        </div>
        <!--.contact-con--> 
      </div>
      <!--left-con-mid-->
      <div class="left-con-bottom"></div>
      <!--left-con-bottom--> 
    </div>
    <!--.left-con-->
    
    <div class="address">
		<?php $article = JUtility::getArticle(16); ?>
		<h2><?php echo $article->title; ?></h2>
		<?php echo $article->introtext; ?>
    </div>
    <!--address--> 
    
    <div class="contact-form">
		{module kontakt}
    </div><!--.contact-form-->
  </div>
  <!--w-contact--> 
</div>
<!--#contact-->
<div class="clear"></div>
<div id="copyright">
	<div id="w-copyright">
		{module footer}
	</div>
</div>
<!--#copyright-->